package com.exoweb.games.hexagone.view
{
    import flash.display.*;
    import flash.events.*;

    import com.exoweb.games.hexagone.view.CellMap;
    import com.exoweb.games.hexagone.view.ImageLocator;

    public class MainGame extends Sprite
    {
        public var cellMap:CellMap;

        private var background:Bitmap;

        public function MainGame()
        {
            background = Bitmap(new ImageLocator.background());
            addChild(background);
            cellMap = new CellMap();
            cellMap.x = 200;
            cellMap.y = 95;
            addChild(cellMap);
            cellMap.start();
        }

        public function display():void
        {
            graphics.beginFill(0xFF0000);
            graphics.drawRect(0, 0, 640, 480);
            graphics.endFill();
        }

        public function update(e:Event):void
        {
            display();
        }
    }
}
